import React from 'react'
import {Switch, Route,} from 'react-router-dom'
// import {connect} from 'react-redux'

// components
import InfoMain from "./componets/InfoMain/InfoMain"
import Password from "./componets/Password/Password"
import Nickname from "./componets/Nickname/Nickname"
import RealInfo from "./componets/RealInfo/RealInfo"
import Level from "./componets/Level/Level"
import YQM from "./componets/YQM/YQM";
import LevelList from "./componets/LevelList/LevelList"

const UserInfoContainer = (props) => {
    const {match,} = props

    return (
        <Switch>
            <Route path={`${match.url}/`} exact component={InfoMain} />
            <Route path={`${match.url}/password`} component={Password} />
            <Route path={`${match.url}/nickname`} component={Nickname} />
            <Route path={`${match.url}/realinfo`} component={RealInfo} />
            <Route path={`${match.url}/level`} component={Level} />
            <Route path={`${match.url}/yqm`} component={YQM} />
            {/*<Route path={`${match.url}/level-list`} component={LevelList} />*/}
            <Route path={`${match.url}/level-list`} component={LevelList} />
        </Switch>
    )
}

// const mapStateToProps = (state) => ({
//     userDetail: state.user.userdetail,
// })
//
// const mapDispatchToProps = ({user: {fetchUserDetail,},}) => ({
//     fetchUserDetail: (id) => fetchUserDetail(id),
// })

// export default connect(
//     mapStateToProps,
//     mapDispatchToProps,
// )(UserInfoContainer)
export default UserInfoContainer
